<?php
	$size_id = $params[2];
	if($_SERVER["REQUEST_METHOD"]=='POST') {
		$title			= strip_tags($_POST['title']);
		$code			= strip_tags($_POST['code']);
		$sql = "UPDATE `tbl_size` SET `title` = '$title' , `code` = '$code' WHERE `size_id` = '$size_id' LIMIT 1;";
		mysql_query($sql);
		redirect('../');
		exit;
	}
	$sql = "SELECT * FROM `tbl_size` WHERE  `size_id` = '$size_id' LIMIT 1";
	$query = mysql_query($sql);
	while($result = mysql_fetch_assoc($query)) {
		$title		= $result['title'];
		$code		= $result['code'];
	}
	mysql_free_result($query);
?>